package com.iran.chainOfResponsibility.example;

public class Majordomo extends Manager {
    public Majordomo(String name) {
        super(name);
    }

    @Override
    public void requestApplications(Request request) {
        if (1==request.getType()&& request.getCount()<6){
            System.out.println("总监处理请假3-5天的请求");
        }else if (3==request.getType()){
            System.out.println("总监处理离职请求");
        }else if (5==request.getType() && request.getCount()<5001){
            System.out.println("总监处理5000以内的报销");
        }else {
            superior.requestApplications(request);
        }
    }
}
